export class BaseSample {

    public name: string = "名字";
    protected _s3d: Laya.Scene3D;
    protected _camera: Laya.Camera;
    protected _world: OIMO.World;

    public Init() {

        this._world = new OIMO.World(OIMO.BroadPhaseType.BVH);

        this._s3d = new Laya.Scene3D();
        Laya.stage.addChildAt(this._s3d, 0);

        this._camera = new Laya.Camera();
        this._camera.name = "camera";
        this._s3d.addChild(this._camera);
        this._camera.transform.position = new Laya.Vector3(0, 10, 10);
        this._camera.transform.rotationEuler = new Laya.Vector3(-45, 0, 0);

        let light = new Laya.DirectionLight();
        light.name = "light";
        this._s3d.addChild(light);
        light.transform.rotationEuler = new Laya.Vector3(-45, 45, 0);
        light.shadowCascadesMode = Laya.ShadowCascadesMode.FourCascades;
        light.shadowMode = Laya.ShadowMode.SoftHigh;

        this._OnInit();
    }

    protected _OnInit() {

    }

    public LogicUpdate(dt: number) {
        this._OnLogicUpdate(dt);
    }

    protected _OnLogicUpdate(dt: number) {

    }

    public Clear() {

    }

    protected _OnClear() {

    }

}